package cn.knightzz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author knightzz
 * @since 2021-04-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysMenu对象", description="")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜单id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "菜单名")
    private String menuName;

    @ApiModelProperty(value = "菜单父id,默认一级菜单父id为0")
    private Long pid;

    @ApiModelProperty(value = "菜单路径, 一级菜单路径可以为空")
    private String path;

    @ApiModelProperty(value = "菜单等级, 一级菜单:0, 二级菜单: 1, 三级菜单:2")
    private Integer level;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    // 排除非数据库字段
    @TableField(exist = false)
    @ApiModelProperty(value = "子菜单")
    private List<SysMenu> children;
}
